<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of createTSConnectionHeatmap_Fig5C,D</title>
  <meta name="keywords" content="createTSConnectionHeatmap_Fig5C,D">
  <meta name="description" content="createTSConnectionHeatmap() builds a heatmap for tumor suppressor">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">code</a> &gt; <a href="index.html">examples</a> &gt; createTSConnectionHeatmap_Fig5C,D.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for code\examples&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>createTSConnectionHeatmap_Fig5C,D
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>createTSConnectionHeatmap() builds a heatmap for tumor suppressor</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function createTSConnectionHeatmap() </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> createTSConnectionHeatmap() builds a heatmap for tumor suppressor
 connectivity retrieving data from 11 DAS sources that provides protein
 interactions data. The heatmap exhibits how connected is each TS, and
 also allows to assess the degree of reliability for a specific TS-nonTS
 interaction.

 SYNTAX: [] = createTSConnectionHeatmap()

 NOTE: assembling these 11 TS networks can take several minutes. To load
 the pre-built dataset uncomment the following line below:
                load TSNetwork_Heatmap.mat conn nonTS tsGenes;

 See also createTumorSuppressorsNet(), tumorSuppressorNetwork_Fig2A,B.m

    DASMiner: DAS library and browser for Matlab.
    Diogo Veiga, Jan 2009.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>	createTumorSupressorsNet() constructs a protein-protein interaction</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function createTSConnectionHeatmap()</a>
0002 <span class="comment">% createTSConnectionHeatmap() builds a heatmap for tumor suppressor</span>
0003 <span class="comment">% connectivity retrieving data from 11 DAS sources that provides protein</span>
0004 <span class="comment">% interactions data. The heatmap exhibits how connected is each TS, and</span>
0005 <span class="comment">% also allows to assess the degree of reliability for a specific TS-nonTS</span>
0006 <span class="comment">% interaction.</span>
0007 <span class="comment">%</span>
0008 <span class="comment">% SYNTAX: [] = createTSConnectionHeatmap()</span>
0009 <span class="comment">%</span>
0010 <span class="comment">% NOTE: assembling these 11 TS networks can take several minutes. To load</span>
0011 <span class="comment">% the pre-built dataset uncomment the following line below:</span>
0012 <span class="comment">%                load TSNetwork_Heatmap.mat conn nonTS tsGenes;</span>
0013 <span class="comment">%</span>
0014 <span class="comment">% See also createTumorSuppressorsNet(), tumorSuppressorNetwork_Fig2A,B.m</span>
0015 <span class="comment">%</span>
0016 <span class="comment">%    DASMiner: DAS library and browser for Matlab.</span>
0017 <span class="comment">%    Diogo Veiga, Jan 2009.</span>
0018 
0019 
0020 <span class="comment">% load TSNetwork_Heatmap.mat conn nonTS tsGenes;</span>
0021 
0022 <span class="keyword">global</span> tsGenes;
0023 <span class="keyword">global</span> tsEntrezID;
0024 
0025 nets = struct(<span class="string">'graph'</span>,{},<span class="string">'label'</span>,{});
0026 nets(1).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'ddi'</span>,false);
0027 nets(1).label = <span class="string">'DDI'</span>;
0028 nets(2).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'hprdEntrez'</span>,false);
0029 nets(2).label = <span class="string">'HPRD'</span>;
0030 nets(3).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'bioverse'</span>,false);
0031 nets(3).label = <span class="string">'Bioverse'</span>;
0032 nets(4).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'bioverse-core'</span>,false);
0033 nets(4).label = <span class="string">'Bioverse-core'</span>;
0034 nets(5).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'ophid'</span>,false); 
0035 nets(5).label = <span class="string">'OPHID'</span>;
0036 nets(6).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'point'</span>,false);
0037 nets(7).label = <span class="string">'Point'</span>;
0038 nets(7).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'homomint'</span>,false); 
0039 nets(7).label = <span class="string">'HomoMINT'</span>;
0040 nets(8).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'CCSB-HI1'</span>,false);
0041 nets(8).label = <span class="string">'CCSB-HI1'</span>;
0042 nets(9).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'sanger'</span>,false);
0043 nets(9).label = <span class="string">'Sanger'</span>;
0044 nets(10).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'himap'</span>,false);
0045 nets(10).label = <span class="string">'Himap'</span>;
0046 nets(11).graph = <a href="createTumorSuppressorsNet.html" class="code" title="function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)">createTumorSuppressorsNet</a>(<span class="string">'http://dasmi.bioinf.mpi-inf.mpg.de/das'</span>,<span class="string">'himap-core'</span>,false);
0047 nets(11).label = <span class="string">'Himap-core'</span>;
0048 
0049 
0050 <span class="comment">%Matrix holds connectivity weight</span>
0051 conn = []; <span class="comment">%initial state</span>
0052 nonTS = {}; <span class="comment">%holds labels for non-TS genes</span>
0053 
0054 
0055 <span class="keyword">for</span> i=1:size(nets,2)
0056 
0057     <span class="keyword">for</span> j=1:size(nets(i).graph.Nodes)
0058 
0059         <span class="keyword">if</span>(isempty(strmatch(nets(i).graph.Nodes(j).Label,tsGenes,<span class="string">'exact'</span>))) <span class="comment">%non TS gene</span>
0060 
0061             anc = getancestors(nets(i).graph.Nodes(j),1); <span class="comment">% TS interacting with this TS gene</span>
0062             idxNonTS = strmatch(nets(i).graph.Nodes(j).Label,nonTS,<span class="string">'exact'</span>);
0063            
0064             <span class="keyword">if</span>(isempty(idxNonTS)) <span class="comment">% new non-TS</span>
0065                 conn = [conn; zeros(1,size(tsGenes,2))]; <span class="comment">%add new row to conn matrix</span>
0066                 nonTS = [nonTS nets(i).graph.Nodes(j).Label]; <span class="comment">%add new label</span>
0067                 idxNonTS = strmatch(nets(i).graph.Nodes(j).Label,nonTS,<span class="string">'exact'</span>); <span class="comment">%get new index</span>
0068             <span class="keyword">end</span>
0069             
0070             <span class="keyword">for</span> k=1:size(anc)
0071                 idxTS = strmatch(anc(k).ID,tsEntrezID,<span class="string">'exact'</span>);
0072                 <span class="keyword">if</span> (~isempty(idxTS))
0073                     conn(idxNonTS,idxTS) = conn(idxNonTS,idxTS) + 1;
0074                 <span class="keyword">end</span>
0075             <span class="keyword">end</span>
0076 
0077         <span class="keyword">end</span>
0078     <span class="keyword">end</span>
0079 
0080 <span class="keyword">end</span>
0081 
0082 
0083 <span class="comment">%Heatmap of protein-TS interaction</span>
0084 figure;
0085 img = imagesc(conn);
0086 set(gca,<span class="string">'XTickLabel'</span>,tsGenes);
0087 <span class="comment">%set(gca,'YTickLabel',nonTS);</span>
0088 set(gca,<span class="string">'YTickLabel'</span>,{});
0089 set(gca,<span class="string">'YTick'</span>,[1:2403]);
0090 set(gca,<span class="string">'XTick'</span>,[1:22]);
0091 set(gca,<span class="string">'FontSize'</span>,8);
0092 colormap(<span class="string">'hot'</span>);
0093 colorbar
0094 
0095 <span class="comment">%Heatmap: closer look to protein-TS interactions for the first 30 non-TS genes</span>
0096 figure;
0097 img = imagesc(conn(1:30,:));
0098 set(gca,<span class="string">'XTickLabel'</span>,tsGenes);
0099 set(gca,<span class="string">'YTickLabel'</span>,nonTS(1:30));
0100 set(gca,<span class="string">'YTick'</span>,[1:30]);
0101 set(gca,<span class="string">'XTick'</span>,[1:22]);
0102 set(gca,<span class="string">'FontSize'</span>,8);
0103 colormap(<span class="string">'hot'</span>);
0104 colorbar
0105 
0106 
0107 
0108 
0109 
0110 
0111 
0112 
0113 
0114 
0115</pre></div>
<hr><address>Generated on Tue 17-Feb-2009 16:14:02 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>